package com.liner.homework.second;

/**
 * Car类：
 * brand(品牌)，color，price，构造方法()，start()、run()、stop()
 */
public class Car {
    private String brand;
    private String color;
    private double price;
    private int seat;
    private int km;

    public Car() {
    }

    public Car(String brand, String color, double price) {
        this.brand = brand;
        this.color = color;
        this.price = price;
    }

    public Car(String brand, String color, double price, int seat, int km) {
        this.brand = brand;
        this.color = color;
        this.price = price;
        this.seat = seat;
        this.km = km;
    }

    public void stop() {
        System.out.println(brand + "停下来了...");
    }

    public void start() {
        System.out.println(brand + "启动了...");
    }

    public void run() {
        System.out.println(brand + "运行起来了...");
    }

    public void info() {
        System.out.println("汽车品牌:" + brand + ",座位数:" + seat + ",售价为:" + price + ",选配漆色:" + color + ",里程数:" + km + "km");
    }
}
